Skip to content

Fixes various inconsistencies and outdated mappings in timezone data #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

niranjan-uma-shankar
Copy link

@niranjan-uma-shankar niranjan-uma-shankar commented Jul 29, 2025

Implements the suggested fixes in TryGhost/Ghost#24536.

Ghost admin tests are updated in TryGhost/Ghost#24562.

Summary of changes:

  1. Removes the redundant America/Tijuana entry, as Tijuana is already covered under Pacific Time.
  2. Create a new GMT-6 entry for Chihuahua using America/Chihuahua, as the current timezone mapping is incorrect.
  3. Create a new GMT-7 entry for La Paz and Mazatlan using America/Mazatlan, as the current timezone mapping is incorrect.
  4. Group Georgetown under GMT-4, along with Caracas and La Paz. All three cities observe GMT-4 throughout the year, and don't observe DST.
  5. Combine Almaty and Astana under a new timezone identifier, as the current timezone mapping is incorrect.
  6. Update Calcutta (former city name) to the current name Kolkata.
  7. Update Rangoon (former city name) to the current name Yangon.
  8. Update Katmandu (former city name) to the current name Kathmandu.
  9. Update Ulaan Bataar to the correct name Ulaanbataar.
  10. Create a new GMT+5:30 entry for Sri Jayawardenepura using Asia/Colombo, as the current timezone mapping is incorrect.
  11. Move Novosibirsk to GMT+7, and group it with Krasnoyarsk, both of which observe the same timezone throughout the year.

Timezone names for various cities were outdated, and in some places, wrong. These are fixed now with correct mapping.
@niranjan-uma-shankar niranjan-uma-shankar changed the title Fixes various inconsistencies in timezone names and cities Fixes various inconsistencies in timezone data and city names Jul 29, 2025
@niranjan-uma-shankar niranjan-uma-shankar changed the title Fixes various inconsistencies in timezone data and city names Fixes various inconsistencies and outdated mappings in timezone data Jul 29, 2025
@niranjan-uma-shankar niranjan-uma-shankar marked this pull request as ready for review July 29, 2025 13:52
@niranjan-uma-shankar niranjan-uma-shankar marked this pull request as draft July 30, 2025 05:00
@niranjan-uma-shankar niranjan-uma-shankar marked this pull request as ready for review July 30, 2025 09:03
@ErisDS ErisDS requested a review from troyciesco August 4, 2025 11:33
Copy link
Contributor

@troyciesco troyciesco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning these up! Just added a few suggestions.

Comment on lines 14 to 17
{
name: 'America/Tijuana',
label: '(GMT -8:00) Chihuahua, La Paz, Mazatlan'
},
{
name: 'America/Los_Angeles',
label: '(GMT -8:00) Pacific Time (US & Canada); Tijuana'
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (blocking): Instead of removing the America/Tijuana item, which could cause backwards compatibility issues (and removes a valid time zone), can we just remove Tijuana from the America/Los_Angeles item and fix the America/Tijuana label?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I've updated with this change.

Comment on lines 220 to +221
name: 'Asia/Krasnoyarsk',
label: '(GMT +7:00) Krasnoyarsk'
label: '(GMT +7:00) Krasnoyarsk,Novosibirsk'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (blocking): Instead of adding Novosibirsk here to Asia/Krasnoyarsk, can we add Asia/Novosibirsk as its own item?

I did some brief reading and the history is pretty confusing, but I think they each have their own time zone identifier even if they currently observe the same times year-round.

Copy link
Author

@niranjan-uma-shankar niranjan-uma-shankar Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially considered adding Asia/Novosibirsk as its own item, but felt the current grouping better aligns with the original intent behind this curated timezone list (see historical context section).

In short, here's my thinking:

  • The list was merged in May 2016 when Novosibirsk had a different timezone. It moved to its current timezone shortly after (in July 2016), but the change wasn’t reflected here.
  • The list is intentionally kept small to avoid overwhelming users. Extra items add up over time.
  • We already group cities that share a timezone. Examples:
    • Rome is grouped under Europe/Amsterdam, even though it has its own canonical identifier Europe/Rome.
    • Madrid is grouped under Europe/Paris, even though it has its own canonical identifier Europe/Madrid.
  • /settings has search for the timezone dropdown, so typing “Novosibirsk” will still find it even if it's grouped and not a separate item.
  • Grouping by country/timezone feels logical, and a separate entry would mainly help with auto-timezone detection, but even that could be implemented without adding new items.

That’s my reasoning, but I’m happy to revisit if you feel strongly about keeping Novosibirsk separate.

{
name: 'America/Los_Angeles',
label: '(GMT -8:00) Pacific Time (US & Canada); Tijuana'
},
{
name: 'America/Mazatlan',
label: '(GMT -7:00) La Paz, Mazatlan'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it might make sense to put the city that matches the time zone first (especially since there's two different "La Paz" in this file), unless there's a reason for doing it this way i'm not aware of.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. The timezone isn’t exposed to the user in the frontend, only the label is. The cities in the label follow alphabetical order, and putting Mazatlan in front would break this order. Was there a specific reason you think putting the city matching the timezone first would work better here?

@@ -185,39 +193,40 @@ const timezoneData: {name: string; label: string}[] = [
},
{
name: 'Asia/Kolkata',
label: '(GMT +5:30) Chennai, Calcutta, Mumbai, New Delhi'
label: '(GMT +5:30) Chennai, Kolkata, Mumbai, New Delhi'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i know this list was already existing, but same suggestion here about putting the city that matches the time zone first in the list (again, unless there's a reason for the order)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my earlier comment, the cities here are in alphabetical order, so putting Kolkata first would break that.

…te entry; this is needed for backward compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants